package cn.lblbc.lib.test

import com.google.gson.Gson

inline fun <reified T : Any> testQueryGoods(): T {
    return Gson().fromJson(goodsText, T::class.java)
}

inline fun <reified T : Any> testQueryCart(): T {
    return Gson().fromJson(cartText, T::class.java)
}

inline fun <reified T : Any> testQueryOrders(): T {
    return Gson().fromJson(ordersText, T::class.java)
}

inline fun <reified T : Any> testQueryAddress(): T {
    return Gson().fromJson(addressText, T::class.java)
}

val goodsText =
    """
    {
        "code": 0,
        "msg": "",
        "data": [
            {
                "id": "1",
                "name": "HUAWEI P50 Pocket 4G 全网通 12GB+512GB 鎏光金",
                "price": 1098800,
                "squarePic": "https://res.vmallres.com/pimages//uomcdn/CN/pms/202112/gbom/6941487248902//428_428_D730AE43D511A27FCAFB0D2AD675CCB2mp.png",
                "descPic": "https://res.vmallres.com//uomcdn/CN/pms/202201/F22F4FE4BE1BF1795F23BCEAF05D4ABE.jpg",
                "originalLink": ""
            },
            {
                "id": "10",
                "name": "ffit8蛋白棒 营养饱腹能量棒 运动健身代餐休闲零食 香蕉蓝莓口味",
                "price": 9900,
                "squarePic": "https://res.vmallres.com/pimages//uomcdn/CN/pms/202109/gbom/6972596160878//428_428_3AF78AA12FADDAF9EBE11A2CCE9D10A5mp.png",
                "descPic": "https://res.vmallres.com//uomcdn/CN/pms/202109/2CDA153B51B266DC4641B190EF17DC6A.jpg",
                "originalLink": ""
            },
            {
                "id": "2",
                "name": "HUAWEI MateBook E 2022款二合一笔记本 11代酷睿 i5 16G 512G Win11 12.6英寸 OLED原色全面屏 多设备互联 星际蓝",
                "price": 699900,
                "squarePic": "https://res.vmallres.com/pimages//product/6941487238989//428_428_047A8AAD89C45343328FD313EEB94340C088DECAAFD4DB68mp.png",
                "descPic": "https://res.vmallres.com/pimages/detailImg/2021/11/16/907B9DB84A69B92217450AC0670D0B1A66944FE9070C7F5A.jpg",
                "originalLink": ""
            },
            {
                "id": "4",
                "name": "HUAWEI MateView GT 27英寸2K超清曲面屏 165Hz刷新率90% P3色域 低蓝光无频闪莱茵护眼认证（无HDMI线缆）",
                "price": 209900,
                "squarePic": "https://res.vmallres.com/pimages//uomcdn/CN/pms/202202/gbom/6941487232963//428_428_91B768F89D6CBB0B25384A645603CBD8mp.png",
                "descPic": "https://res.vmallres.com//uomcdn/CN/pms/202112/E79EFA13D0888C6728346389A327CD4F.jpg",
                "originalLink": ""
            },
            {
                "id": "6",
                "name": "HUAWEI MateStation S 小机箱台式机 7nm锐龙八核R7-4700G 16GB+512GB DDR4双通道内存 多设备高效协同 一键指纹开机解锁 满载28分贝智慧风冷系统 Win10三年保修+华为显示器 S24（含HDMI线）",
                "price": 489900,
                "squarePic": "https://res.vmallres.com/pimages//product/4601010000203//428_428_5FC77F1CC357DEC5F53D46CE9032F031F1709BAFFBDF1143mp.png",
                "descPic": "https://res.vmallres.com/pimages/detailImg/2021/09/11/FB0039435C9C788D5874C10749B9826504124CE4E46FBA10.jpg",
                "originalLink": ""
            },
            {
                "id": "8",
                "name": "HUAWEI P50 4G 全网通 8GB+256GB（可可茶金）",
                "price": 498800,
                "squarePic": "https://res.vmallres.com/pimages//product/6941487235780//428_428_C9565892589F30AF38DD6055FDAAAFB2621AFE267731083Fmp.png",
                "descPic": "https://res.vmallres.com/pimages/detailImg/2021/09/29/1270D124C03769CC0A1F6DC0F5532F2441442B5BE1F00A02.png",
                "originalLink": ""
            },
            {
                "id": "3",
                "name": "HUAWEI MatePad Pro 10.8英寸 2021款 8GB+128GB Wi-Fi 夜阑灰 支持M-Pencil 触控笔 绚丽全面屏平板电脑",
                "price": 349900,
                "squarePic": "https://res.vmallres.com/pimages//product/6941487227624//428_428_5B52FE52A204DB8F572BB1B5B84B024991A392D7AD812FFFmp.png",
                "descPic": "https://res.vmallres.com//uomcdn/CN/pms/202112/7907B99DAA00DE88585CD2B24247E551.jpg",
                "originalLink": ""
            },
            {
                "id": "5",
                "name": "华为黑白激光多功能打印机 HUAWEI PixLab X1 HarmonyOS 靠近配网 一碰打印 复印扫描",
                "price": 174900,
                "squarePic": "https://res.vmallres.com/pimages//product/6941487237746//428_428_D1BA03B40ACBDE152A51E93ACE23DA9A227EE48AB3606C39mp.png",
                "descPic": "https://res.vmallres.com/pimages/detailImg/2021/10/22/917180BF31813CC91FBFC3363245AB3CF8AA6392CBC99AED.jpg",
                "originalLink": ""
            },
            {
                "id": "7",
                "name": "智利原瓶进口 火山珍藏混酿红葡萄酒十周年纪念版 六支装750ml*6 赤霞珠西拉融合",
                "price": 100800,
                "squarePic": "https://res.vmallres.com/pimages//uomcdn/CN/pms/202111/sbom/3501020005302//428_428_39611F2854A6EF45D1D638706D8F8E75mp.png",
                "descPic": "https://res.vmallres.com//uomcdn/CN/pms/202109/1966DA14E45C3B72612A4E3BC0E1103E.jpg",
                "originalLink": ""
            },
            {
                "id": "9",
                "name": "智利原瓶进口 火山特科托尼亚赤霞珠红葡萄酒 六支装",
                "price": 147600,
                "squarePic": "https://res.vmallres.com/pimages//uomcdn/CN/pms/202111/sbom/3102150246302//428_428_579E5D33C0398F426E4C780E960653F9mp.png",
                "descPic": "https://res.vmallres.com//uomcdn/CN/pms/202109/59EE46F995594FD8AEEC42B4D036AB96.jpg",
                "originalLink": ""
            }
        ]
    }
    """.trimIndent()

val cartText =
    """
    {
        "code":0,
        "msg":"",
        "data":[
            {
                "id":"lbl6350e7c004054b78aa56e2201a78c32f",
                "goodsId":"2",
                "name":"HUAWEI MateBook E 2022款二合一笔记本 11代酷睿 i5 16G 512G Win11 12.6英寸 OLED原色全面屏 多设备互联 星际蓝",
                "price":699900,
                "squarePic":"https://res.vmallres.com/pimages//product/6941487238989//428_428_047A8AAD89C45343328FD313EEB94340C088DECAAFD4DB68mp.png",
                "quantity":4
            },
            {
                "id":"lblaa35a949852d4ae79d8317971bda11dc",
                "goodsId":"1",
                "name":"HUAWEI P50 Pocket 4G 全网通 12GB+512GB 鎏光金",
                "price":1098800,
                "squarePic":"https://res.vmallres.com/pimages//uomcdn/CN/pms/202112/gbom/6941487248902//428_428_D730AE43D511A27FCAFB0D2AD675CCB2mp.png",
                "quantity":6
            },
            {
                "id":"lbl9ac9a60ebdc44017a6a8149d93ac0ac8",
                "goodsId":"4",
                "name":"HUAWEI MateView GT 27英寸2K超清曲面屏 165Hz刷新率90% P3色域 低蓝光无频闪莱茵护眼认证（无HDMI线缆）",
                "price":209900,
                "squarePic":"https://res.vmallres.com/pimages//uomcdn/CN/pms/202202/gbom/6941487232963//428_428_91B768F89D6CBB0B25384A645603CBD8mp.png",
                "quantity":1
            },
            {
                "id":"lbl8966c2b20d5b4f8c95c1be7f55e8a260",
                "goodsId":"8",
                "name":"HUAWEI P50 4G 全网通 8GB+256GB（可可茶金）",
                "price":498800,
                "squarePic":"https://res.vmallres.com/pimages//product/6941487235780//428_428_C9565892589F30AF38DD6055FDAAAFB2621AFE267731083Fmp.png",
                "quantity":1
            }
        ]
    }
    """.trimIndent()

val ordersText =
    """
           {
            "code":0,
            "msg":"",
            "data":[
                {
                    "orderId":"lbldb39b15ec16e46a9bef2fc8e07a5dd39",
                    "status":2,
                    "createTime":1651821433882,
                    "list":[
                        {
                            "orderId":"lbldb39b15ec16e46a9bef2fc8e07a5dd39",
                            "status":2,
                            "goodsId":"4",
                            "name":"HUAWEI MateView GT 27英寸2K超清曲面屏 165Hz刷新率90% P3色域 低蓝光无频闪莱茵护眼认证（无HDMI线缆）",
                            "price":209900,
                            "squarePic":"https://res.vmallres.com/pimages//uomcdn/CN/pms/202202/gbom/6941487232963//428_428_91B768F89D6CBB0B25384A645603CBD8mp.png",
                            "quantity":1
                        },
                        {
                            "orderId":"lbldb39b15ec16e46a9bef2fc8e07a5dd39",
                            "status":2,
                            "goodsId":"2",
                            "name":"HUAWEI MateBook E 2022款二合一笔记本 11代酷睿 i5 16G 512G Win11 12.6英寸 OLED原色全面屏 多设备互联 星际蓝",
                            "price":699900,
                            "squarePic":"https://res.vmallres.com/pimages//product/6941487238989//428_428_047A8AAD89C45343328FD313EEB94340C088DECAAFD4DB68mp.png",
                            "quantity":2
                        }
                    ],
                    "address":{
                        "id":"3153c41434a34d8c8fe7f51d94312b1c",
                        "userId":1,
                        "name":"蓝不蓝编程",
                        "phone":"13900000000",
                        "address":"北京市朝阳区XX小区",
                        "defaultAddress":true
                    }
                },
                {
                    "orderId":"lbl0edc449a3ab349b9b8c9267fa28893c7",
                    "status":2,
                    "createTime":1651821424285,
                    "list":[
                        {
                            "orderId":"lbl0edc449a3ab349b9b8c9267fa28893c7",
                            "status":2,
                            "goodsId":"10",
                            "name":"ffit8蛋白棒 营养饱腹能量棒 运动健身代餐休闲零食 香蕉蓝莓口味",
                            "price":9900,
                            "squarePic":"https://res.vmallres.com/pimages//uomcdn/CN/pms/202109/gbom/6972596160878//428_428_3AF78AA12FADDAF9EBE11A2CCE9D10A5mp.png",
                            "quantity":1
                        }
                    ],
                    "address":{
                        "id":"3153c41434a34d8c8fe7f51d94312b1c",
                        "userId":1,
                        "name":"蓝不蓝编程",
                        "phone":"13900000000",
                        "address":"北京市朝阳区XX小区",
                        "defaultAddress":true
                    }
                },
                {
                    "orderId":"lbl53353d60080541cd9cbb73d3f68fbb65",
                    "status":2,
                    "createTime":1651819624173,
                    "list":[
                        {
                            "orderId":"lbl53353d60080541cd9cbb73d3f68fbb65",
                            "status":2,
                            "goodsId":"1",
                            "name":"HUAWEI P50 Pocket",
                            "price":1098800,
                            "squarePic":"https://res.vmallres.com/pimages//uomcdn/CN/pms/202112/gbom/6941487248902//428_428_D730AE43D511A27FCAFB0D2AD675CCB2mp.png",
                            "quantity":1
                        }
                    ],
                    "address":{
                        "id":"3153c41434a34d8c8fe7f51d94312b1c",
                        "userId":1,
                        "name":"蓝不蓝编程",
                        "phone":"13900000000",
                        "address":"北京市朝阳区XX小区",
                        "defaultAddress":true
                    }
                }
            ]
        }
    """.trimIndent()

val addressText =
    """
    {
        "code":0,
        "msg":"",
        "data":[
            {
                "id":"1",
                "userId":1,
                "name":"蓝不蓝编程",
                "phone":"13900000000",
                "address":"北京市朝阳区XX小区",
                "defaultAddress":true
            },
            {
                "id":"2",
                "userId":1,
                "name":"蓝不蓝编程2",
                "phone":"13900000001",
                "address":"北京市朝阳区XX小区2",
                "defaultAddress":false
            },
            {
                "id":"3",
                "userId":1,
                "name":"蓝不蓝编程3",
                "phone":"13900000002",
                "address":"北京市朝阳区XX小3",
                "defaultAddress":false
            }
        ]
    }
    """.trimIndent()